<template>
  <div class="margin-container-list">
    <!-- 操作区域 -->
    <div class="tab-style-default">
      <el-tabs v-model="activeName">
        <el-tab-pane label="操作日志" name="0"></el-tab-pane>
        <el-tab-pane label="API回调日志" name="1"></el-tab-pane>
      </el-tabs>
    </div>
    <!-- 操作日志 -->
    <template v-if="activeName === '0'">
      <audit-log ref="auditLog"></audit-log>
    </template>
    <!-- API回调日志 -->
    <template v-if="activeName === '1'">
      <api-log ref="apiLog"></api-log>
    </template>
  </div>
</template>


<style scoped>

</style>

<script>
  import { getNameByPath } from '@/utils/get-name-by-path' // 不要删除，根据URL获取文件名
  import apiLog from './api-log'
  import auditLog from './audit-log'

  export default {
    components: { apiLog, auditLog },
    name: getNameByPath(),
    data() {
      return {
        activeName: '0'
      }
    },
    // 过滤器
    filters: {
      statusFilter(status) {
        const statusMap = {
          1: 'success',
          2: 'danger'
        }
        return statusMap[status]
      }
    },
    // 初始化页面
    created() {
    },
    methods: {
    },
    mounted() {
    }
  }
</script>
